//当前模块的功能：API接口统一管理
//用到了二次封装的requests，需要将其引入
import requests from "@/api/request";


export const requestLogin = (params) => requests.post(`/login`, params);

export const getUserList = (params) => requests.get(`/user/list`, params);

export const getUserListPage = (params) => requests.get(`/user/listpage`, params);

export const removeUser = (params) => requests.get(`/user/remove`, params);

export const batchRemoveUser = (params) => requests.get(`/user/batchremove`, params);

export const editUser = (params) => requests.get(`/user/edit`, params);

export const addUser = (params) => requests.get(`/user/add`, params);




export const getDepartmentList = (id) => requests.get(`/dept/${id}`);

export const getDepartmentListPage = (params) => requests.post(`/dept`, params);

export const removeDepartment = (id) => requests.delete(`/dept/${id}`);

export const batchRemoveDepartment = (params) => requests.patch(`/dept`, params);

export const addOrEditDepartment = (params) => requests.put(`/dept`, params);

export const getEmployeeList = () => requests.get(`/emp`);

export const getDepartmentTree = () => requests.get(`/dept/tree`)

